<!DOCTYPE html>
<html>
{include file="public/head" /}
<body>
<div class="nav-tabs-custom" style="box-shadow:0 0 0 0; margin:5px;">
<ul class="nav nav-tabs">
  <li class="active"><a href="#tab_1" data-toggle="tab">基础设置</a></li>
  <li><a href="#tab_2" data-toggle="tab">扩展设置</a></li>   
  <li><a href="#tab_3" data-toggle="tab">上映设置</a></li>             
</ul> 
<form id="myform" class="myform form-horizontal"  method="post">
<input type="hidden" id="vod_id" name="vod_id" value="{$info['vod_id']|default=''}"> 
<div class="box-body">
<div class="tab-content tab-fade fade active in " id="tab_1"> 
  <div class="row">
    <div class="input-group margin15">
    <div class="input-group-btn hidden-xs hidden-sm">
      <span class="btn btn-default form-left-title">视频分类：</span>
      <span class="form-left-title-hide"></span>
    </div>
    {php}
    $data = F('_data/listvod');
    array_multisort(array_column($data, 'list_oid'), SORT_ASC, $data);
    {/php}
    <div class="select-group-t w150 search">
      <select id="vod_cid" name="vod_cid" class="form-control select2" required="required" placeholder="请选择分类" style="width:100%">
        <option value=''>选择分类</option>
        {volist name="$data" id="vo"}
        {notempty name="vo.son"}
        {php}
        $sdata = $vo['son'];
        array_multisort(array_column($sdata, 'list_oid'), SORT_ASC, $sdata);
        {/php}
        <optgroup label="{$vo.list_name}">
        {volist name="$sdata" id="splist"}
        <option value="{$splist.list_id}" {eq name="splist.list_id" value="$info['vod_cid']"}selected{/eq}>├ {$splist.list_name}</option>
        {/volist}
        </optgroup>
        {else/}
        <option value="{$vo.list_id}" {eq name="vo.list_id" value="$info['vod_cid']"}selected{/eq}>{$vo.list_name}</option>
        {/notempty}
        {/volist}
      </select>
    </div>
    <div class="select-group-t w100 search">
      <select id="vod_area" name="vod_area" class="form-control select2" style="width:100%">
      {notempty name="info.vod_area"}<option value='{$info.vod_area}' selected>{$info.vod_area}</option>{/notempty}<option value=''>地区</option>{volist name=":explode(',',$video['video_area'])" id="val"}<option value="{$val}">{$val}</option>{/volist}
      </select>
    </div>
    <div class="select-group-t w100 search">
      <select id="vod_year" name="vod_year" class="form-control select2" style="width:100%">
      {notempty name="info.vod_year"}<option value='{$info.vod_year}' selected>{$info.vod_year}</option>{/notempty}<option value=''>年代</option>{volist name=":explode(',',$video['video_year'])" id="val"} <option value="{$val}">{$val}</option>{/volist}
      </select> 
    </div>
    <div class="select-group-t w100 search">
      <select id="vod_language" name="vod_language" class="form-control select2" style="width:100%">
      {notempty name="info.vod_language"}<option value='{$info.vod_language}' selected>{$info.vod_language}</option>{/notempty}<option value=''>语言</option>{volist name=":explode(',',$video['video_language'])" id="val"} <option value="{$val}">{$val}</option>{/volist}
      </select>
    </div>
    <div class="select-group-t w100 search">
      <select name="vod_isfilm" class="form-control select2" style="width:100%">
        <option value="1" {eq name="info.vod_isfilm" value="1"}selected{/eq}>已上映</option>
        <option value="2" {eq name="info.vod_isfilm" value="2"}selected{/eq}>未上映</option>
        <option value="3" {eq name="info.vod_isfilm" value="3"}selected{/eq}>热映中</option>
      </select> 
    </div>
    <div class="select-group-t w100 search">
      <select name="vod_isend" class="form-control select2" style="width:100%">
        <option value="1">已完结</option>
        <option value="0" {eq name="info.vod_isend" value="0" }selected{/eq}>连载中</option>
      </select> 
    </div>
    <div class="select-group-t w100 search">
      <select name="vod_status" class="form-control select2" style="width:100%">
        <option value="1">已审</option>
        <option value="0" {eq name="info.vod_status" value="0" }selected{/eq}>未审</option>
      </select>
    </div>
    <div class="select-group-t w100 ">
      <select name="vod_lock" class="form-control select2" style="width:100%">
        <option value="0">未锁</option>
        <option value="1" {eq name="info.vod_lock" value="1" }selected{/eq}>锁定</option>
      </select>
    </div>
    <span class="pretty success input-xz" style="margin-top: 9px;">
      <input name="sendurl" type="checkbox" value="1" id="checkbox" {empty name="info['vod_id']"}checked{/empty}> 
      <label><i class="mdi mdi-check"></i> 推送百度</label>
    </span>
  </div>

  <div class="col-md-6 col-sm-6 col-xs-12 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频名称：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_name" name="vod_name" value="{$info.vod_name|default=''}" placeholder="填写视频名称点击获取可以获取豆瓣资料" >
      <span class="input-group-btn">
        <button type="button" class="btn btn-success btn-flat" id="getvodname">获取资料</button>
      </span>
    </div>
  </div>
  <div class="col-md-3 col-sm-6 col-xs-12 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">时长：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control text-center" id="vod_length" name="vod_length" value="{$info.vod_length|default=''}" placeholder="视频时长,分钟">
    </div>
  </div>
  <div class="col-md-3 col-sm-6 col-xs-12 mb10">
    <div class="input-group">
      <span class="input-group-btn">
        <button type="button" class="btn btn-default btn-flat form-title">颜色</button>
      </span>
      <div class="input-group color-input">
        <input type="text" class="form-control" name="vod_color" value="{$info.vod_color|default=''}">
        <div class="input-group-addon"><i style="background-color: rgb(0, 0, 0);"></i></div>
      </div>
    </div>
  </div>
  <div class="col-md-12 col-sm-12 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频TAG：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" id="vod_tag" name="vod_tag" value="{$info.vod_tag|default=''}" class="form-control tag" data-tip="视频TAG标签" >
      <span class="input-group-btn">
        <button type="button" class="btn btn-success btn-flat btn-editone" href="{:url('tag/showajax',array('sid'=>1))}"  data-name="添加TAG"><i class="fa fa-plus"></i> 添加TAG</button>
      </span>
      <span class="input-group-btn">
        <span class="pretty success input-xz">
          <input name="auto_tag" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_auto_tag')"}checked{/notempty}> 
          <label><i class="mdi mdi-check"></i> 自动生成</label>
        </span>
      </span>                   
    </div>
  </div>

  <div class="col-md-12 col-sm-12 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频别名：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_aliases" name="vod_aliases" value="{$info.vod_aliases|default=''}">
    </div>
  </div>
  
  <div class="col-md-12 col-sm-12 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频主演：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_actor" name="vod_actor" value="{$info.vod_actor|default=''}">
    </div>
  </div>

  <div class="col-md-12 col-sm-12 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频类型：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="hidden" name="vod_mcid" value="">
      <span id="vod_cat_list" class="form-control" style="overflow:hidden; height:auto">
        {notempty name="info.vod_cid"}
        {volist name=":get_list_mcat($info.vod_cid)" id="vo"}
        <label class="pretty success">
          <input type="checkbox" name="vod_mcid[]" value="{$vo.m_cid}" id="checkbox" {if in_array($vo['m_cid'],explode(',',$info.vod_mcid))}checked="checked"{/if}> 
          <label><i class="mdi mdi-check"></i> {$vo.m_name}</label>
        </label>
        {/volist} 
        {else/}
        {volist name=":get_list_mcat(1)" id="vo"}
        <label class="pretty success">
          <input type="checkbox" name="vod_mcid[]" value="{$vo.m_cid}" id="checkbox" {if in_array($vo['m_cid'],explode(',',$info.vod_mcid))}checked="checked"{/if}> 
          <label><i class="mdi mdi-check"></i> {$vo.m_name}</label>
        </label>
        {/volist}
        {/notempty}
      </span>
    </div>
  </div>

  <!-- <div class="col-md-12 col-sm-12 col-xs-12 mb10" id="caiji" style="display:none">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">豆瓣数据：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <select class="form-control" id="pianyuan" style="width:100%"></select>
      <span class="input-group-btn">
        <button type="button" class="btn btn-default btn-flat" id="getdoubanid">导入资料</button>
      </span>
    </div>
  </div> -->
  
  <div class="col-md-12 col-sm-12 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频周期：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="hidden" name="vod_weekday" value="">
      <span id="vod_cat_list" class="form-control">
        {volist name=":parse('textarea',config('setting.week_list'))" id="vo"}
        <label class="pretty success">
          <input type="checkbox" name="vod_weekday[]" value="{$key}" id="checkbox" {if condition="$info['vod_weekday'] == $key"}checked="checked"{/if}> 
          <label><i class="mdi mdi-check"></i> {$vo}</label>
        </label>
        {/volist}
      </span>
    </div> 
  </div>
  <input type="hidden" id="vod_mcid_name" name="vod_mcid_name" value=""> 
  <div class="col-md-6 col-sm-6 col-xs-6 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频属性：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="hidden" name="vod_prty" value="">
      <span class="text-link form-control">
      {volist name=":parse('textarea',config('setting.document_position'))" id="vo"}
      <label class="pretty success">
        <input type="checkbox" name="vod_prty[]" value="{$key}" id="checkbox" {if condition="$info['vod_prty'] == $key"}checked="checked"{/if}> 
        <label><i class="mdi mdi-check"></i> {$vo|msubstr=0,2}</label>
      </label>
      {/volist} 
      </span>
    </div>
  </div>
  
  <div class="col-md-6 col-sm-6 col-xs-6 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">播出时间：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_time" name="vod_time" value="{$info.vod_time|default=''}">
    </div>
  </div>

  <div class="col-md-6 col-sm-6 col-xs-6 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频导演：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_director" name="vod_director" value="{$info.vod_director|default=''}">
    </div>
  </div>
  <div class="col-md-6 col-sm-6 col-xs-6 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频原作：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_original" name="vod_original" value="{$info.vod_original|default=''}">
    </div>
  </div>
  
  <div class="col-md-6 col-sm-6 col-xs-6 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频官网：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_website" name="vod_website" value="{$info.vod_website|default=''}">
    </div>
  </div>

  <div class="col-md-6 col-sm-6 col-xs-6 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">制作公司：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_company" name="vod_company" value="{$info.vod_company|default=''}">
    </div>
  </div>

  <div class="col-md-6 col-sm-6 col-xs-6 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频备注：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_title" name="vod_title" value="{$info.vod_title|default=''}">
    </div>
  </div>
  
  <div class="col-md-6 col-sm-6 col-xs-6 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">连载集数：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_continu" name="vod_continu" value="{$info.vod_continu|default=''}">
    </div>
  </div>

  <div class="col-md-6 col-sm-6 col-xs-6 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">集数：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_total" name="vod_total" value="{$info.vod_total|default=''}" placeholder="填写视频总集数,数字">
    </div>   
  </div>
  <div class="col-md-6 col-sm-6 col-xs-6 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频标签：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" id="vod_label" name="vod_label" value="{$info.vod_label|default=''}" placeholder="视频标签说明" class="form-control">
    </div>
  </div>
    
  <div class="col-md-6 col-sm-6 col-xs-6 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">无修地址：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_repair" name="vod_repair" value="{$info.vod_repair|default=''}">
    </div>   
  </div>
  
  <div class="col-md-6 col-sm-6 col-xs-6 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">无修标题：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_repairtitle" name="vod_repairtitle" value="{$info.vod_repairtitle|default=''}">
    </div>
  </div>
    
  <div class="col-md-6 col-sm-6 col-xs-6 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">度盘地址：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_pan" name="vod_pan" value="{$info.vod_pan|default=''}">
    </div>   
  </div>
  
  <div class="col-md-6 col-sm-6 col-xs-6 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">度盘标题：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_pantitle" name="vod_pantitle" value="{$info.vod_pantitle|default=''}">
    </div>
  </div>

<div class="col-md-6 col-sm-6 col-xs-12 mb10 pr0">
  <div class="input-group">
    <div class="input-group-btn">
      <span class="btn btn-default form-left-title">豆瓣ID：</span>
      <span class="form-left-title-hide"></span>
    </div>
    <input type="text" class="form-control" id="vod_doubanid" name="vod_doubanid" value="{$info.vod_doubanid|default=''}" value="{$info.vod_total|default=''}" placeholder="填写豆瓣ID" >
    <span class="input-group-btn">
      <button type="button" class="btn btn-primary btn-flat" id="getdoubaninfo">获取资料</button> <button type="button" class="btn btn-success btn-flat get_cm">获取评论</button>
    </span>
    </div> 
  </div>
  <div class="col-md-6 col-sm-6 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">百科网址：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input type="text" class="form-control" id="vod_baike" name="vod_baike" value="{$info.vod_baike|default=''}" placeholder="支持百度,360百科,TV2345视频地址" >
      <span class="input-group-btn">
        <button type="button" class="btn btn-primary btn-flat" id="getbaikeinfo">获取资料</button>
      </span>
    </div>
  </div>

  <div class="col-md-6 col-sm-6 col-xs-12 mb10 pr0">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频图片：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input class="form-control" size="50" id="vod_pic" name="vod_pic" type="text" value="{$info['vod_pic']|default=''}">
      <span class="input-group-btn">
        <button type="button" class="btn btn-primary btn-flat plupload" id="plupload-image" data-input-id="vod_pic" data-mimetype="image/*"   data-multiple="false"  data-multipart='{"thumb":"1"}'><i class="fa fa-upload"></i> 上传</button>
      </span>
    </div>
  </div>

  <div class="col-md-6 col-sm-6 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频缩略图：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input  class="form-control" size="50" id="vod_pic_thumb" name="vod_pic_thumb" type="text" value="{$info['vod_pic_thumb']|default=''}">
      <span class="input-group-btn">
        <button type="button" class="btn btn-primary btn-flat plupload" id="plupload-images" data-input-id="vod_pic_thumb" data-mimetype="image/*"  data-multiple="false"><i class="fa fa-upload"></i> 上传</button>
      </span>
    </div>
  </div> 
  <div class="col-md-12 col-sm-12 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">视频海报：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <input  class="form-control" size="50" id="vod_bigpic" name="vod_bigpic" type="text" value="{$info['vod_bigpic']|default=''}">
      <span class="input-group-btn">
        <button type="button" class="btn btn-primary btn-flat plupload" id="plupload-imagess" data-input-id="vod_bigpic" data-mimetype="image/*"  data-multiple="false"><i class="fa fa-upload"></i> 上传</button>
      </span>
    </div>
  </div>
  <div class="col-md-12 col-sm-12 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">版权设置：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <span class="text-link form-control">
        <label class="pretty circle primary">
          <input name="vod_copyright" type="radio" value="0" {empty name="info.vod_copyright"}checked{/empty}> 
          <label><i class="default"></i> 关闭</label>
        </label>
        <label class="pretty circle primary">
          <input name="vod_copyright" type="radio" value="1" {eq name="info.vod_copyright" value="1"}checked{/eq}> 
          <label><i class="default"></i> 文字提示</label>
        </label>
        <label class="pretty circle primary">
          <input name="vod_copyright" type="radio" value="2" {eq name="info.vod_copyright" value="2"}checked{/eq}> 
          <label><i class="default"></i> 播放页跳转</label>
        </label>
        <label class="pretty circle primary">
          <input name="vod_copyright" type="radio" value="3" {eq name="info.vod_copyright" value="3"}checked{/eq}> 
          <label><i class="default"></i> 内容页跳转</label>
        </label>
        <span class="hidden-xs hidden-sm"> &nbsp;&nbsp;&nbsp;&nbsp;!注意:文字提示-请先到系统设置-视频设置-中设置版权提示</span>
      </span>
    </div> 
  </div>
  <div class="col-md-12 col-sm-12 col-xs-12 mb10">
    <div class="input-group">
      <div class="input-group-btn">
        <span class="btn btn-default form-left-title">地址排序：</span>
        <span class="form-left-title-hide"></span>
      </div>
      <span class="text-link form-control">
        <label class="pretty primary">
          <input type="radio" name="vod_playoid" value="0" {empty name="info.vod_playoid"}checked{/empty}> 
          <label><i class="default"></i> 播放器排序</label>
        </label>
        <label class="pretty primary">
          <input type="radio" name="vod_playoid" type="radio" value="1" {eq name="info.vod_playoid" value="1"}checked{/eq}> 
          <label><i class="default"></i> 按内容排序</label>
        </label>
        <span class="hidden-xs hidden-sm"> &nbsp;&nbsp;&nbsp;&nbsp;!注意:播放器排序更具 播放器管理中播放器排序 按内容排序按照内容中播放器排序方式排</span>
      </span>
    </div>
  </div>
              
  
                
                <div class="margin15" id="urldata">
                 {volist name="info.vod_url" id="url" key="uu"}
                <div class="urldata input-group mb20" id="data_{$uu}">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">播放地址{$uu}：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <div class="col-md-4 col-sm-4 col-xs-12 pl0 prrr0">
                <select name="vod_play[]" id="vod_play" class="form-control">
                 <option value=''>选择来源标识</option>
                {volist name=":F('_play/play')" id="play"}<option value="{$play['play_name']}" {if condition="$play['play_name'] eq $info.vod_play[$uu-1]"}selected{/if}>{$i}.{$play['play_name']}.{$play['play_title']}</option>{/volist}</select>
                </div>
                <div class="col-md-8 col-sm-8 col-xs-12" style="padding: 6px 0;">
                <a href="javascript:;" class="text-link margin5 clearurl"> <i class="fa fa-trash-o"></i> 清空</a>
                <a href="javascript:;" class="text-link margin5 delurl"> <i class="fa fa-times-rectangle"></i> 删除</a>
                <a href="javascript:;"  class="text-link margin5 sorturl"> <i class="fa fa-refresh"></i> 反序</a>
                <a href="javascript:;" class="text-link margin5 upurl"> <i class="fa fa-arrow-up"></i> 上移</a>
                <a href="javascript:;"  class="text-link margin5 downurl"> <i class="fa fa-arrow-down"></i> 下移</a>
                <a href="javascript:;"  class="text-link margin5 removeurl"> <i class="fa fa-bars"></i> 去前缀</a>
                <a href="javascript:;"  class="text-link margin5 checkurl"> <i class="fa fa-th-list"></i> 校正地址</a>
               </div>
             <textarea name='vod_url[]' id="vod_url" class="form-control" style="height:150px; margin-top:-1px;">{$url}</textarea>
         </div> 
         {/volist}
         </div>
                
                   <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">添加一组：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
              <button type="button" class="btn  btn-primary btn-flat addurl"><i class="fa fa-plus"></i> 添加一组地址</button>

              </div>
              
              
                
                
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频介绍：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <textarea  class="editor"  id="vod_content" name="vod_content"  style=" width:100%;height:300px">{$info['vod_content']}</textarea>
              </div>   
              
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">更新时间：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
              <input type="text" name="vod_addtime" value="{notempty name="info.vod_addtime"}{$info.vod_addtime|date='Y-m-d H:i:s',###}{else/}{:date('Y-m-d H:i:s',time())}{/notempty}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss">
<span class="input-group-btn">
<span class="pretty success input-xz">
<input name="vod_checktime" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_uptime')"}checked{/notempty}> 
<label><i class="mdi mdi-check"></i> 更新时间</label>
</span>
</span> 
              </div>              
              
               </div>
              <!-- /row -->
                     
                
            </div>
            <!-- /.tab_1-->
           <div class="tab-content tab-fade fade " id="tab_2">
            <div class="row">
             <div class="col-md-3 col-sm-3 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频权限：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                    <select name="vod_vipplay" class="form-control select2" style="width:100%">
                        <option value="0">免费点播</option>
                        <option value="1" {eq name="info.vod_vipplay" value="1" }selected{/eq}>登录点播</option>
                        <option value="2" {eq name="info.vod_vipplay" value="2" }selected{/eq}>VIP播放</option>
                        <option value="3" {eq name="info.vod_vipplay" value="3" }selected{/eq}>微信扫码</option>
                    </select>
              </div>   
              </div> 
                <div class="col-md-3 col-sm-3 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">试看时间：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                 <input type="text" name="vod_trysee"  value="{$info.vod_trysee|default=''}" class="form-control text-center">
              </div>   
              </div> 
              
                <div class="col-md-3 col-sm-3 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">播放积分：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                 <input type="text" name="vod_pay"  value="{$info.vod_pay|default=''}" class="form-control text-center">
              </div>   
              </div>
                <div class="col-md-3 col-sm-3 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">下载积分：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                 <input type="text" name="vod_downpay"  value="{$info.vod_downpay|default=''}" class="form-control text-center">
              </div>   
              </div>
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频标题：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="vod_stitle"  name="vod_stitle" value="{$info.vod_stitle|default=''}" placeholder="用于前台视频页面的SEO标题" class="form-control">
              </div>
              
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-title">视频关键词：</span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="vod_keywords"  name="vod_keywords" value="{$info.vod_keywords|default=''}" class="form-control" placeholder="用于前台视频页面的关键词,填写关键词获取,留空获取视频名称关键词" >
                <span class="input-group-btn">
                 <button type="button" class="btn btn-success btn-flat getkeywords" data-name="vod_name" data-names="vod_keywords" data-id="vod_keywords"><i class="fa fa-plus"></i> 获取关键词</button>
                 </span>
                   <span class="input-group-btn">
                 <span class="pretty success input-xz">
<input name="auto_keywords" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_auto_keywords')"}checked{/notempty}> 
<label><i class="mdi mdi-check"></i> 自动获取</label>
</span>
</span>                 

                
              </div>
              
                 <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频描述：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <textarea  class="form-control" name="vod_description" id="vod_description">{$info['vod_sdescription']|default=''}</textarea>
              </div>
                 <div class="col-md-6 col-sm-6 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频拼音：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                 <input type="text" name="vod_letters"  value="{$info.vod_letters|default=''}"  class="form-control text-center" placeholder="留空自动获取">
              </div>   
              </div>
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">首字母：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                 <input type="text" name="vod_letter"  value="{$info.vod_letter|default=''}" class="form-control text-center" placeholder="留空自动获取">
              </div>   
              </div>             
             <div class="col-md-3 col-sm-6 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">推荐星级：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input name="vod_stars" id="vod_stars" type="hidden" value="{$info.vod_stars|default=''}">
                <span class="text-link form-control" style="padding-top:4px;">
                {volist name=":admin_star_arr($info.vod_stars)" id="ajaxstar"}<img src="{$Think.TPL_PATH}tpl/zanpianadmin/img/star{$ajaxstar}.gif" id="vod_{$i}" class="addstars" width="19px" height="19px">{/volist}
                </span>
              </div>   
              </div>              
             <div class="col-md-6 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">录入编辑：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_inputer" id="vod_inputer"  value="{$info.vod_inputer|default=''}" class="form-control text-center" >
              </div>   
              </div>
             <div class="col-md-6 col-sm-6 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">独立模版：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_skin"  value="{$info.vod_skin|default=''}" class="form-control text-center" placeholder="留空使用分类中内容模版">
              </div>   
              </div> 
              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">总人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="vod_hits" name="vod_hits"  value="{$info.vod_hits|default=''}" class="form-control text-center" >
              </div>   
              </div>
              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">月人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_hits_month"  value="{$info.vod_hits_month|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">周人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_hits_week"  value="{$info.vod_hits_week|default=''}" class="form-control text-center" >
              </div>   
              </div>                                          
                                                                                    
              <div class="col-md-3 col-sm-6 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">日人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_hits_day"  value="{$info.vod_hits_day|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              
               <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">评分值：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="vod_gold" name="vod_gold"  value="{$info.vod_gold|default=''}" class="form-control text-center" >
              </div>   
              </div>
                           
                <div class="col-md-3 col-sm-6 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">评分人：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="vod_golder" name="vod_golder"  value="{$info.vod_golder|default=''}" class="form-control text-center" >
              </div>   
              </div>
                 <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">顶人数：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_up"  value="{$info.vod_up|default=''}" class="form-control text-center" >
              </div>   
              </div> 
                 <div class="col-md-3 col-sm-12 col-xs-12 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">踩人数：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_down"  value="{$info.vod_down|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              
                 <div class="col-md-12 col-sm-12 col-xs-12 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">采集来源：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_reurl" id="vod_reurl" value="{$info.vod_reurl|default=''}" class="form-control text-center" >
              </div>   
              </div> 
                  <div class="col-md-12 col-sm-12 col-xs-12 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">跳转地址：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_jumpurl" id="vod_jumpurl" value="{$info.vod_jumpurl|default=''}" class="form-control text-center" >
              </div>   
              </div>                                                                      
                                           
              </div>
              <!-- /row -->
                             
              
                                             
            </div> 
            <!-- /.tab_2 -->
            <div class="tab-content tab-fade fade " id="tab_3">
            <div class="row"> 
                 <div class="col-md-4 col-sm-12 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">上映时间：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="vod_filmtime" name="vod_filmtime" value="{notempty name="info.vod_filmtime"}{$info.vod_filmtime|date='Y-m-d',###}{/notempty}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" placeholder="格式：2016-12-20">
              </div>   
              </div> 
                  <div class="col-md-8 col-sm-12 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">播出电台：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_diantai" id="vod_diantai" value="{$info.vod_diantai|default=''}" class="form-control" placeholder="多个请用逗号,分割">
              </div>   
              </div>              
                   <div class="col-md-12 col-sm-12 col-xs-12 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">播出提示：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="vod_tvcont" id="vod_tvcont" value="{$info.vod_tvcont|default=''}" class="form-control">
              </div>   
              </div> 
                 <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">上映说明：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <textarea class="editor"  name="vod_tvexp" id="vod_tvexp"  style="width:100%; height:300px">{$info['vod_tvexp']}</textarea>
              </div>   
                                        
              
            </div>          
           </div> 
            <!-- /.tab_3 -->
        <div class="box-footer {notempty name=":request()->param('dialog')"}hidden{/notempty} layer-footer">
          <div  class="footer-btn">
               <button type="submit" class="btn btn-success btn-embossed">确定</button>
               <button type="reset" class="btn btn-default btn-embossed">重置</button>
               {notempty name=":request()->param('dialog')"}
               <button type="reset" class="btn btn-primary btn-embossed btn-close" onClick="layer.closeAll();"> 关闭</button>
               {/notempty}
            </div>
       </div>
       <!-- /.box-footer -->     
</div>
<!-- /.box-body --> 
</form>
</div>
<!-- /.nav-tabs-custom -->    
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.cms.vod();
	String.prototype.replaceAll = function(s1, s2) {
		return this.replace(new RegExp(s1, "gm"), s2);
	}
        function getPatName(n, l, s) {
		var res = "";
		var rc = false;
		if (s.indexOf("qvod:") > -1 || s.indexOf("bdhd:") > -1 || s.indexOf("cool:") > -1) {
			var arr = s.split('|');
			if (arr.length >= 2) {
				res = arr[2].replace(/[^0-9]/ig, "");
				rc = true;
				if (res != "") {
					if (res.length > 3) {
						res += "期";
					} else if (l == 1) {
						res = "全集";
					} else {
						res = '第' + res + '集';
					}
				} else {
					res = FindNote(s);
					if (s == "") {
						if (l == 1) {
							res = "全集";
						} else {
							rc = false;
						}
					}
				}
			}
		}
		if (!rc) {
			res = '第' + (n < 9 ? '0' : '') + (n + 1) + '集';
		}
		return res;
	}
	$(document).on("change", "select[name='vod_cid']", function(){
		var id = $(this).val();
		$.get('{:url('batch/mcat')}',{cid:id},function(data, status) {
			$("#vod_cat_list").html(data);
		});
	});		
				$(document).on("click", ".clearurl", function() {
					arr = $(this).parent().parent().attr("id").split("_");
					$("#data_" + arr[1] + " #vod_url").val('');

				});
				$(document).on("click", ".sorturl", function() {
					arr = $(this).parent().parent().attr("id").split("_");
					s1 = $("#data_" + arr[1] + " #vod_url").val();
					s2 = "";
					if (s1.length == 0) {
						layer.msg('请填写地址', {icon: 2,time: 1800});
						return false;
					}
					s1 = s1.replaceAll("\r", "");
					arr1 = s1.split("\n");
					for (j = arr1.length - 1; j >= 0; j--) {
						if (arr1[j].length > 0) {
							s2 += arr1[j] + "\r\n";
						}
					}
					$("#data_" + arr[1] + " #vod_url").val(s2.trim());
					layer.msg('排序成功', {icon: 1,time: 1800});
				});
				$(document).on("click", ".removeurl", function() {
					arr = $(this).parent().parent().attr("id").split("_");
					s1 = $("#data_" + arr[1] + " #vod_url").val();
					s2 = "";
					if (s1.length == 0) {
						layer.msg('请填写地址', {icon: 2,time: 1800});
						return false;
					}
					s1 = s1.replaceAll("\r", "");
					arr1 = s1.split("\n");
					for (j = 0; j < arr1.length; j++) {
						if (arr1[j].length > 0) {
							urlarr = arr1[j].split('$');
							urlarrcount = urlarr.length - 1;
							if (urlarrcount == 0) {
								arr1[j] = arr1[j];
							} else {
								arr1[j] = urlarr[1];
							}
							s2 += arr1[j] + "\r\n";
						}
					}
					$("#data_" + arr[1] + " #vod_url").val(s2.trim());
					layer.msg('去前缀成功', {icon: 1,time: 1800});
				});

				$(document).on("click", ".checkurl", function() {
					arr = $(this).parent().parent().attr("id").split("_");
					s1 = $("#data_" + arr[1] + " #vod_url").val();
					s2 = "";
					if (s1.length == 0) {
						layer.msg('请填写地址', {icon: 2,time: 1800});
						return false;
					}
					s1 = s1.replaceAll("\r", "");
					arr1 = s1.split("\n");
					arr1len = arr1.length;
					for (j = 0; j < arr1len; j++) {
						if (arr1[j].length > 0) {
							urlarr = arr1[j].split('$');
							urlarrcount = urlarr.length - 1;
							if (urlarrcount == 0) {
								arr1[j] = getPatName(j, arr1len, arr1[j]) + '$' + arr1[j];
							}
							s2 += arr1[j] + "\r\n";
						}
					}
					$("#data_" + arr[1] + " #vod_url").val(s2.trim());
					layer.msg('验校成功', {icon: 1,time: 1800});
				});

				$(document).on("click", ".delurl", function() {
					arr = $(this).parent().parent().attr("id").split("_");
					var i = $("#urldata #vod_url").length;
					if (i != 1) {
						$("#data_" + arr[1]).remove();
						layer.msg('删除成功', {icon: 1,time: 1800});
					} else {
						layer.msg('已经最后一个鸟~~', {icon: 2,time: 1800});
					}
				});
				$(document).on("click", ".upurl", function() {
					var objParentTR = $(this).parent().parent();
					var prevTR = objParentTR.prev();
					if (prevTR.length > 0) {
						prevTR.insertAfter(objParentTR);
						layer.msg('上移成功', {icon: 1,time: 1800});
					} else {
						layer.msg('已经是开头鸟~~', {icon: 2,time: 1800});
					}
				});
				$(document).on("click", ".downurl", function() {
					var objParentTR = $(this).parent().parent();
					var nextTR = objParentTR.next();
					if (nextTR.length > 0) {
						nextTR.insertBefore(objParentTR);
						layer.msg('下移成功', {icon:1,time: 1800});
					} else {
						layer.msg('已经是最后鸟~~', {icon:1,time: 1800});
					}
				});
               $(document).on('click', ".addurl", function() {
					var $old = $("#urldata>.urldata:last").html();
					$urln = $("#urldata>.urldata").length;
					$old = $old.replace("播放地址" + $urln, "播放地址" + ($urln + 1));
					$("#urldata>.urldata:last-child").after('<div class="urldata input-group mb10" id="data_' + ($urln + 1) + '">' + $old + '</div>');
					$("#urldata>.urldata:last #vod_play").val($("#vod_play:last option").val());
					$("#urldata>.urldata:last textarea").val('');
					
				})
   $(document).on('click', ".get_cm", function(){
			 var vod_id = $("#vod_id").val();
			 var douban_id = $("#vod_doubanid").val();
			 if(vod_id==''){
				return layer.msg('视频ID不能为空', {icon: 2});
			 }
			if(douban_id==''){
				return layer.msg('采集地址不能为空', {icon: 2});
			 }
			 layer.msg('数据获取中...');
			 $.ajax({
					type: 'post',
					url: zanpian.api.fixurl('get/cm'),
					data: {'vod_id':vod_id,'douban_id':douban_id},
					dataType: 'json',
					success: function(data) {
							if (data.code >= 1) {
								layer.msg(data.msg ? data.msg : '采集入库评论成功', {icon:1,time: 1800});
							} else {
						        layer.msg(data.msg ? data.msg : '采集入库评论失败', {icon:2,time: 1800});
					        }
					},
				     error: function(data) {
					      layer.confirm('程序返回：' + data.status + ' 错误,点击查看详细错误', {zIndex:layer.zIndex,icon: 5, title:'出错啦！',btn: ['查看', '关闭']}, function() {$('html').html(data.responseText);});
				            },
			});
   }) 			   
	
});	
</script>
</body>
</html>
